import { defineStore } from 'pinia'
const useLayoutStore = defineStore({
  id: 'layout',
  state: () => ({
    menuCollapsed: false
  }),
  getters: {},
  actions: {
    menuTrigger() {
      this.menuCollapsed = !this.menuCollapsed
    }
  },
  persist: {
    enabled: true,
    strategies: [
      {
        key: '', // 默认key是上面store的id，可自定义key
        storage: localStorage, // 默认是sessionStorage会话存储，可以设置为localStorage本地长存储
        paths: ['']
      }
    ]
  }
})
export default useLayoutStore
